<template>
    我是：{{props.name}}
    <div>
        <n-button @click="clickThis">+1</n-button>点击通过defineEmits语法糖给父组件+1
    </div>
</template>
    
<script setup lang='ts'>
import { dialogProps } from "naive-ui/lib/dialog/src/dialogProps";
interface Props {
    name: string
}
const props = defineProps<Props>() 
const emit= defineEmits<{
    (e: 'click', str: string): void
}>()

const clickThis = () => {
    emit('click', '还可以传具体值' )
}
</script>
    
<style>
    
</style>